The invention relates to a method of recognizing a code which is encoded inside an image data set which contains a respective piece of information on a gray scale value for each of a plurality of picture elements.
Such codes exist as two-dimensional codes, for example of the kind Maxicode, Datamatrix, QR, PDF 417 or MicroPDF 417. One-dimensional codes, in particular so-called barcodes, have been known for quite some time.
These codes serve, for example, as visual data carriers on objects which should be identified or distinguished from one another. Such a code is usually detected by means of an optoelectronic sensor, for example a CCD or CMOS receiver, with a linear- or matrix-shaped arrangement of picture elements and converted into a piece of electronic image information which is available as an image data set. The gray scale value data which were determined for the individual picture elements of the sensor are listed in a tabular list in the image data set.
The image data set is initially examined as to the presence of a reference pattern which characterizes the arrangement of the code in question within the image information as well as the kind of code. The individual code elements of which the code is made up are identified on the basis of the identification of this reference pattern. A binarization then takes place for these code elements using a threshold formation; i.e. the gray scale value determined for a code element is allocated to the category “white” or to the category “black”. The actual decoding takes place subsequent to these steps, and indeed using an algorithm corresponding to the identified code type.
For certain products, it is known to apply the code directly to the product by means of a stamping process as part of the so-called direct marking process. For this purpose, stamped openings, so-called dots, are introduced into a single color area, the dots contrasting with the single color background and thereby being intended to serve as code elements.
With poorly represented codes, in particular with codes which have been produced using the direct marking process, the risk can exist of a non-recognition or a defective recognition of the code.